Nested Polygons

<#246#><#246#>

<#247#><#247#>

When || is specified within a |~;SPMlt;;SPMgt;<#248#>|...|<#248#>| or |~;SPMgt;;SPMgt;<#249#>|...|<#249#>| switch for another polygon, then the inner polygon inherits a name which incorporates the number of the part on which it occurs, as given by |xypolynode|. This name is accessed using ||. In the following example the inner polygon is placed using |~;SPMlt;;SPMgt;| in order to easily adjust its orientation to the outward direction of the spokes.


#code250#

#math368#

#tex2html_wrap_indisplay1259#

Notice how nested polygons inherit names |;SPMquot;1,1;SPMquot;|, |;SPMquot;1,2;SPMquot;|, ..., |;SPMquot;4,1;SPMquot;|, ..., |;SPMquot;4,4;SPMquot;| for their vertices. If a ;SPMlt;prefix;SPMgt; is supplied at the outermost level then the names become: |;SPMquot;|;SPMlt;prefix;SPMgt;i, j|;SPMquot;|. Specifying a ;SPMlt;prefix;SPMgt; for the inner polygon overrides this naming scheme. The same names may then be repeated for each of the inner polygons, allowing access afterwards only to the last---possibly useful as a memory saving feature when the vertices are not required subsequently.

Four levels of nesting gives a quite acceptable ``Sierpinski gasket''. The innermost triangle is provided by |<#837#>#tex2html_accent_inline1261#<#837#>| from the symbol font |msam5|, at 5-point size. Further levels can be achieved using the backend, otherwise line segments become too small to be rendered using -fonts.


#code257#

#math369#

#tex2html_wrap_indisplay1263#

Note the use of naming in this example; when processing this manual it saves 13,000+ words of main memory and 10,000+ string characters as well as 122 strings and 319 multi-letter control sequences.

2

<#1264#>Figure<#1264#>: <#1265#>Trigonometry tables for Polygon vertices.<#1265#>
#figurestar270#

( @@#1#2<#320#>#1 only works from 0 to 12<#320#>

@#1<#711#>#1 1-10.5 .809017.900969.92388.939693.951057 .959493.9659261@<#321#>#1<#321#><#711#> @#1<#712#>#1 001 .587785.5.433884.382683.34202.309017 .281733.2588190@<#322#>#1<#322#><#712#>

@#1<#713#>#1 11-1-32 <#323#>10<#323#>3.623494 .7660445.8412546 1@<#324#>#1<#324#><#713#> @#1<#714#>#1 000-32 <#325#>10<#325#>3.7818314 .6427885.5406416 0@<#326#>#1<#326#><#714#>

@#1<#715#>#1 1-10-1-4 -52.22252183 5.6548614 1@<#327#>#1<#327#><#715#> @#1<#716#>#1 00104 52.97492883 5.755754 0@<#328#>#1<#328#><#716#>

@#1<#717#>#1 111-3-1-5 3-70.1736485 .4154153 1@<#329#>#1<#329#><#717#> @#1<#718#>#1 000-305 371.9848085 .9096323 0@<#330#>#1<#330#><#718#>

@#1<#719#>#1 1-103-4 -1-6-7-8-9 0.142315<#331#>12<#331#>122 1@<#332#>#1<#332#><#719#> @#1<#720#>#1 001-3-4 067891 .989821<#333#>12<#333#>123 0@<#334#>#1<#334#><#720#> )

2 Coordinates for the vertices are read from trigonometry tables using control sequences
#defs335#
which expand to the values of #math370#cos#tex2html_wrap_inline1268#, #math371#sin#tex2html_wrap_inline1270#, #math372#cos#tex2html_wrap_inline1272#, ..., #math373#sin#tex2html_wrap_inline1274# and are also available for other uses. The parameter~n must be a non-negative integer up to~12. The complete table is in figure~??[f.trigonometry].

2